package spark.sql

import org.apache.spark.sql.catalyst.expressions.UnsafeRow

object ExpressionEncoderTest {

  def main(args: Array[String]): Unit = {
    import org.apache.spark.sql.catalyst.encoders.ExpressionEncoder
    val stringEncoder = ExpressionEncoder[String]
    val row = stringEncoder.toRow("hello world")
    println(row)
    val unsafeRow = row match { case ur: UnsafeRow => ur }
    println(unsafeRow)
  }

}
